-- GENERATED SPELL FOR [Stormpike Battleguard] --


function spell0_14284(pUnit, Event) --@Charge,n/a--
pUnit:FullCastSpellOnTarget(22120,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14284', 551, 1)
end

function spell1_14284(pUnit, Event) --@Improved Blocking,Self--
pUnit:FullCastSpellOnTarget(3248,pUnit)
pUnit:RegisterEvent('Sorts_14284', 6274, 1)
end

function spell2_14284(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(16509,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14284', 15000, 1)
end

function spell3_14284(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(22591,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_14284', 561, 1)
end

function Sorts_14284(pUnit, Event)
local choix_sorts_14284 = math.random(0, 3)
if choix_sorts_14284 == 0 then
pUnit:RegisterEvent('spell0_14284', 1, 1)
end
if choix_sorts_14284 == 1 then
pUnit:RegisterEvent('spell1_14284', 1, 1)
end
if choix_sorts_14284 == 2 then
pUnit:RegisterEvent('spell2_14284', 1, 1)
end
if choix_sorts_14284 == 3 then
pUnit:RegisterEvent('spell3_14284', 1, 1)
end
end

function mob14284_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_14284', math.random(1500, 3000), 1)
end

function mob14284_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14284_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob14284_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(14284, 1, 'mob14284_Action')
RegisterUnitEvent(14284, 2, 'mob14284_Leave')
RegisterUnitEvent(14284, 3, 'mob14284_Kill')
RegisterUnitEvent(14284, 4, 'mob14284_Die')
